package com.jessica.learnio;

import java.util.*;

public class InputAndGetSubString {
    public static void main(String[] args) {
        int start, length;
        Scanner reader = new Scanner(System.in);
        System.out.print("Please enter the string:\n");
        String s = reader.nextLine();  // pineapple
        System.out.print("Please enter the start and length:\n");
        start = reader.nextInt();  // 4
        length = reader.nextInt();  // 5
        System.out.print(s.substring(start, start + length));
    }
}
